<template>
	<div class="chart-pane-bar">
		<!-- tops -->
		<div id="EchartsPies"></div>
	</div>
</template>
<script>
// 引入 ECharts 主模块
var echarts = require('echarts/lib/echarts');
export default{
	name:'EchartsPies',
	data(){
		return {
			msg:''
		}
	},
	computed: {
    },
    mounted(){
    	var that = this;
    	that.getbarsimple();
	},
	props:['seriesData'],
	methods:{
		getbarsimple(){
			let that=this;
			// 基于准备好的dom，初始化echarts实例
			var myChart = echarts.init(document.getElementById('EchartsPies'));
			// 绘制图表
			myChart.setOption({
				tooltip: {
					trigger: 'item',
					formatter: "{a} <br/>{b}: {c} ({d}%)"
				},
				series: [
					{
						name:'发稿类型',
						type:'pie',
						radius: ['40%', '70%'],
						avoidLabelOverlap: false,
						label: {
							normal: {
								formatter: '{b|{b}：}{c}',
								rich: {
									b: {
										fontSize: 12,
										lineHeight: 24
									}
								}
							}
						},
						labelLine: {
							normal: {
								show: true//显示标签线条
							}
						},
						data:that.seriesData
					}
				]

			});
		}
	}
}
</script>
<style scoped>
#EchartsPies{
	width:100%;
	height: 300px;
}
</style>